package com.wanxi.web.service.repertory;

import com.wanxi.repertory.service.api.query.RepertoryQuery;
import com.wanxi.repertory.service.api.result.CommonResult;
import com.wanxi.repertory.service.api.vo.*;

import java.util.List;

/**
 * ClassName: RepertoryWebService
 * Description:
 * date: 2022/1/21 14:14
 *
 * @author lxl
 * @version 1.0
 * @since JDK 1.8
 */
public interface RepertoryWebService {

    /**
     * 根据店铺id查找店铺下所有sku id
     * @param shopId
     * @return
     */
    CommonResult<List<Long>> findSkuIdByShopId( Long shopId);

    /**
     * 查找商品id根据销售量排序
     * @return
     */
    CommonResult<List<Long>> findSkuIdDescSaleTotal();

    /**
     * 通过skuId查找销售量与剩余库存
     * @param skuId
     * @return
     */
    CommonResult<RepertoryTotalFindByIdOutVo> findTotalBySkuId(Long skuId);

    /**
     * 修改库存量与商品上下架
     * @param repertoryUpdateInVo
     * @return
     */
    CommonResult updateTotal(RepertoryTotalUpdateInVo repertoryUpdateInVo);

    /**
     * 分配库存
     * @param skuAllocateInVo
     * @return
     */
    CommonResult allocate(RepertoryTotalAllocateInVo skuAllocateInVo);

    /**
     * 添加库存流水记录
     * @param repertoryAddInVo
     * @return
     */
    CommonResult<Long> addRecord(RepertoryRecordAddInVo repertoryAddInVo);

    /**
     * 获取库存流水列表
     * @param repertoryQuery
     * @return
     */

    CommonResult<RepertoryRecordFindAllOutVo> findAllRecord(RepertoryQuery repertoryQuery);

    /**
     * 根据id查找库存流水
     * @param repertoryId
     * @return
     */
    CommonResult<RepertoryRecordFindByIdOutVo> findRecordById(Long repertoryId);



}
